﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace sapphirelang.AST.Patterns
{
    // var [= match]
    // optionally matches the input against another pattern,
    // and then binds the input to a variable
    class BindPattern
    {
        public string var;
        public Pattern match;

        public BindPattern(string var, Pattern match)
        {
            this.var = var;
            this.match = match;
        }
        public BindPattern(string var)
        {
            this.var = var;
            this.match = null;
        }
    }
}
